package visitor.pattern.demo;

/**
 * Created by 逸足天涯
 * Date: 2019/10/21.
 * Time: 14:29
 */
public class MyClass implements IOriginalInterface {
    private int myInt = 5;

    public int getMyInt() {
        return myInt;
    }

    public void setMyInt(int myInt) {
        this.myInt = myInt;
    }

    @Override
    public void accept(IVisitor visitor) {
        System.out.println("Initial value of the interger : " + myInt);
        visitor.visitor(this);
        System.out.println("\nValue of the integer now : " + myInt);
    }
}
